#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Last Update:

'''API的更改, P102
'''

##########version 1##########
class Hello(object):
    def hello(self):
        print 'hello'

Hello().hello()
print
##########version 1.5##########
import warnings
class Hello(object):
    def hello(self):
        warnings.warn("'hello' will be replaced by 'run'", DeprecationWarning)
        return self.run()

    def run(self):
        print 'hello'

Hello().hello()
print
##########version 1.5##########
class Hello(object):
    def run(self):
        print 'hello'

Hello().run()

